<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>srpy.srpyclient.EngBox</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="srpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/srpy/">Simple Remote Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="srpy-module.html">Package&nbsp;srpy</a> ::
        <a href="srpy.srpyclient-module.html">Module&nbsp;srpyclient</a> ::
        Class&nbsp;EngBox
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="srpy.srpyclient.EngBox-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class EngBox</h1><p class="nomargin-top"><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox">source&nbsp;code</a></span></p>
<p>A class that manages and helps to deal with several 
  PythonEngine(s)</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list of strs</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pyengs</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Creates a new EngBox instance.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#append" class="summary-sig-name">append</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pyeng</span>)</span><br />
      Appends a new PythonEngine to the EngBox.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.append">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#startAndAppend" class="summary-sig-name">startAndAppend</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">uri</span>)</span><br />
      Start and append a PythonEngine based on its uri id.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppend">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#startAndAppendFromText" class="summary-sig-name">startAndAppendFromText</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">uritxt</span>)</span><br />
      Start and append a PythonEngine based on a text containing a URI id 
      per line.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppendFromText">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#startAndAppendFromFile" class="summary-sig-name">startAndAppendFromFile</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">urifilepath</span>)</span><br />
      Start and append a PythonEngine based on a urifile.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppendFromFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getEngines"></a><span class="summary-sig-name">getEngines</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the list of PythonEngine(s)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.getEngines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="toList"></a><span class="summary-sig-name">toList</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Same as EngBox.getEngines() - Returns the list of PythonEngine(s)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.toList">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">EngBox</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#searchForEngine" class="summary-sig-name">searchForEngine</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">ip</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">hostname</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Search for PythonEngine(s) with given name, group, ip or hostname.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.searchForEngine">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">PythonEngine or EngBox</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#getFastest" class="summary-sig-name">getFastest</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">single</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">basis</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">all</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      Returns the fastest PythonEngine based on benchmarks</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.getFastest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list of ints or EngBox</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#getDead" class="summary-sig-name">getDead</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">new</span>=<span class="summary-sig-default">False</span>)</span><br />
      Returns indexes of dead PythonEngine(s)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.getDead">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cleanDead"></a><span class="summary-sig-name">cleanDead</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Removes dead PythonEngine(s) from internal list</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.cleanDead">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#mrs" class="summary-sig-name">mrs</a>(<span class="summary-sig-arg">self</span>)</span><br />
      mrs - Multi-Run in Sequence</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrs">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#mrp" class="summary-sig-name">mrp</a>(<span class="summary-sig-arg">self</span>)</span><br />
      mrp - Multi-Run in Parallel</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrp">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="srpy.srpyclient.EngBox-class.html#mrpwait" class="summary-sig-name">mrpwait</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mrp_result</span>,
        <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">sleeptime</span>=<span class="summary-sig-default">0.01</span>)</span><br />
      Waits for all the threads in a 'mrp' job to finish.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrpwait">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__str__"></a><span class="summary-sig-name">__str__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__repr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__delitem__"></a><span class="summary-sig-name">__delitem__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__delitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Class Variables</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_engines_"></a><span class="summary-name">_engines_</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pyengs</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Creates a new EngBox instance.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri1, proc1 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>uri2, proc2 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng1 = srpy.PythonEngine(uri1)
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng2 = srpy.PythonEngine(uri2)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox([pyeng1, pyeng2])</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>pyengs</code></strong> (list) - PythonEngine(s) instance list</li>
    </ul></dd>
    <dt>Returns: list of strs</dt>
  </dl>
</td></tr></table>
</div>
<a name="append"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">append</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pyeng</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.append">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Appends a new PythonEngine to the EngBox.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri, proc = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng = srpy.PythonEngine(uri)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox()
<span class="py-prompt">&gt;&gt;&gt; </span>engbox.append(pyeng)</pre>
  <dl class="fields">
    <dt>Returns: None</dt>
  </dl>
</td></tr></table>
</div>
<a name="startAndAppend"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">startAndAppend</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">uri</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppend">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Start and append a PythonEngine based on its uri id.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri, proc = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox()
<span class="py-prompt">&gt;&gt;&gt; </span>engbox.startAndAppend(uri)</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>uri</code></strong> (str) - remote PythonEngine identifier</li>
    </ul></dd>
    <dt>Returns: None</dt>
  </dl>
</td></tr></table>
</div>
<a name="startAndAppendFromText"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">startAndAppendFromText</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">uritxt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppendFromText">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Start and append a PythonEngine based on a text containing a URI id 
  per line.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>uritxt</code></strong> (str) - sequence of lines with uri identifiers</li>
    </ul></dd>
    <dt>Returns: None</dt>
  </dl>
</td></tr></table>
</div>
<a name="startAndAppendFromFile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">startAndAppendFromFile</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">urifilepath</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.startAndAppendFromFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Start and append a PythonEngine based on a urifile.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>urifilepath</code></strong> (str) - path to urifile containing the remote PythonEngine(s) uri 
          identifiers</li>
    </ul></dd>
    <dt>Returns: None</dt>
  </dl>
</td></tr></table>
</div>
<a name="searchForEngine"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">searchForEngine</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">group</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">ip</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">hostname</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.searchForEngine">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Search for PythonEngine(s) with given name, group, ip or hostname.</p>
  <dl class="fields">
    <dt>Returns: EngBox</dt>
        <dd>found PythonEngine(s)</dd>
  </dl>
</td></tr></table>
</div>
<a name="getFastest"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getFastest</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">single</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">basis</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">all</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwds</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.getFastest">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the fastest PythonEngine based on benchmarks</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri1, proc1 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>uri2, proc2 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng1 = srpy.PythonEngine(uri1)
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng2 = srpy.PythonEngine(uri2)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox([pyeng1, pyeng2])
<span class="py-prompt">&gt;&gt;&gt; </span>engbox.getFastest()</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>single</code></strong> (bool) - if True, returns the fastest PythonEngine; if False, returns a 
          new EngBox with PythonEngine(s) sorted by speed</li>
        <li><strong class="pname"><code>basis</code></strong> (str) - 'proc' to base choice on processor benchmark, 'net' to base 
          choice on network benchmark or 'all' to base choice on both.</li>
        <li><strong class="pname"><code>args</code></strong> (arg list) - arguments to use with the <a 
          href="srpy.srpyclient.PythonEngine-class.html#benchmark" 
          class="link">PythonEngine.benchmark</a> method</li>
        <li><strong class="pname"><code>kwds</code></strong> (kwd dict) - keywords to use with the <a 
          href="srpy.srpyclient.PythonEngine-class.html#benchmark" 
          class="link">PythonEngine.benchmark</a> method</li>
    </ul></dd>
    <dt>Returns: PythonEngine or EngBox</dt>
  </dl>
</td></tr></table>
</div>
<a name="getDead"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getDead</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">new</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.getDead">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns indexes of dead PythonEngine(s)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>new</code></strong> (bool) - if not False, returns a new EngBox with the PythonEngine(s)</li>
    </ul></dd>
    <dt>Returns: list of ints or EngBox</dt>
  </dl>
</td></tr></table>
</div>
<a name="mrs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">mrs</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrs">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>mrs - Multi-Run in Sequence</p>
  <p>After initialization allows access to PythonEngine methods except 'ns'
  and runs the given method in sequence.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri1, proc1 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>uri2, proc2 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng1 = srpy.PythonEngine(uri1)
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng2 = srpy.PythonEngine(uri2)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox([pyeng1, pyeng2])
<span class="py-prompt">&gt;&gt;&gt; </span>engbox.mrs.set(a=3)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox.mrs.get().values()
<span class="py-output">[['a'], ['a']]</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>engbox.mrs.get(<span class="py-string">'a'</span>).values()
<span class="py-output">[3, 3]</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>engbox.mrs.get(<span class="py-string">'lets cause an error'</span>)
<span class="py-output">[KeyError('lets cause an error',), KeyError('lets cause an error',)]</span></pre>
  <dl class="fields">
    <dt>Returns: dict</dt>
        <dd>sequence of PythonEngine reference: method return values, if an 
          error ocurs, it will be present as the return value</dd>
  </dl>
</td></tr></table>
</div>
<a name="mrp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">mrp</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrp">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>mrp - Multi-Run in Parallel</p>
  <p>Similar to 'mrs' but runs the given method in parallel through 
  threads.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri1, proc1 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>uri2, proc2 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng1 = srpy.PythonEngine(uri1)
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng2 = srpy.PythonEngine(uri2)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox([pyeng1, pyeng2])
<span class="py-prompt">&gt;&gt;&gt; </span>res = engbox.mrp.benchmark(); res.values()
<span class="py-output">['__null__', '__null__']</span></pre>
  <dl class="fields">
    <dt>Returns: dict</dt>
        <dd>sequence of PythonEngine reference: method return values, return 
          values are by default '__null__' until the thread finishes. See 
          method 'mrpwait' for ways to wait for threads to finish.</dd>
  </dl>
</td></tr></table>
</div>
<a name="mrpwait"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">mrpwait</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">mrp_result</span>,
        <span class="sig-arg">timeout</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">sleeptime</span>=<span class="sig-default">0.01</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="srpy.srpyclient-pysrc.html#EngBox.mrpwait">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Waits for all the threads in a 'mrp' job to finish.</p>
  <p>Example:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> srpy
<span class="py-prompt">&gt;&gt;&gt; </span>uri1, proc1 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>uri2, proc2 = srpy.newSubEngine()
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng1 = srpy.PythonEngine(uri1)
<span class="py-prompt">&gt;&gt;&gt; </span>pyeng2 = srpy.PythonEngine(uri2)
<span class="py-prompt">&gt;&gt;&gt; </span>engbox = srpy.EngBox([pyeng1, pyeng2])
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> engbox.mrpwait(engbox.mrp.benchmark())</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>timeout</code></strong> (number) - maximum amount of time to wait for 'mrp' job to finish, if -1 
          will wait forever.</li>
        <li><strong class="pname"><code>sleeptime</code></strong> (number) - how offen in seconds the function checks to see if 'mrp' job has 
          finished, if this value is too low will create high processor 
          overhead, on the other side, if the value is too high it may 
          cause delays in the return</li>
    </ul></dd>
    <dt>Returns: None</dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="srpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/srpy/">Simple Remote Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri Mar 27 12:24:25 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
